﻿$('.htmlgrid tbody tr th:eq(0)').text("批复时间");


var cols = $('.htmlgrid tbody tr th').length;
var rows = $('.htmlgrid tbody tr').length;

for (var i = 1; i < cols; i++) {
    header = $('.htmlgrid tbody tr th:eq(' + i + ')').text();
    header = header.replace("C", "");
    var wcls = header.split("TO");
    var w1, w2;
    if (wcls.length == 2) {
        w1 = wcls[0];
        w2 = wcls[1];
    }
    if (wcls.length == 1) {
        w2 = wcls[0];
    }
    for (var j = 1; j < rows; j++) {
        year1 = $('.htmlgrid tbody tr:eq(' + j + ') td:eq(0)').text();
        year2 = year1 ;
        txt = $('.htmlgrid tbody tr:eq(' + j + ') td:eq(' + i + ')').text();
        txt = "<a href='M01_JDBView.aspx?y1=" + year1 + "&y2=" + year2 + "&w1=" + w1 + "&w2=" + w2 + "' target='_parent'>" + txt + "</a>";
        $('.htmlgrid tbody tr:eq(' + j + ') td:eq(' + i + ')').html(txt)
    }
}

//修改表头文字 如需俄文翻译 请将此js翻译成俄文即可

for (var i = 1; i < $('.htmlgrid tbody tr th').length; i++) {
    header = $('.htmlgrid tbody tr th:eq(' + i + ')').text();
    header = header.replace("C", "");
    header = "完成率" + header.replace("TO", "~") + "%";
    $('.htmlgrid tbody tr th:eq(' + i + ')').text(header);
}
